﻿using System.Configuration;
using CID.Execution.Support.PackageHandling.Configuration;
using CID.Execution.Support.TemplateHandling.Configuration;

namespace CID.Execution.Agent.Service.Configuration
{
    static class ApplicationConfiguration
    {
        static ApplicationConfiguration()
        {
            AgentServiceHostingAddress = ConfigurationManager.AppSettings["agentServiceHostingAddress"];
            ControllerAddress = ConfigurationManager.AppSettings["controllerAddress"];
            PackageHandlingConfiguration = (PackageHandlingSection)ConfigurationManager.GetSection(PackageHandlingSection.SectionName);
            TemplateHandlingConfiguration = (TemplateHandlingSection)ConfigurationManager.GetSection(TemplateHandlingSection.SectionName);
        }

        public static string AgentServiceHostingAddress { get; private set; }

        public static string ControllerAddress { get; private set; }

        public static PackageHandlingSection PackageHandlingConfiguration { get; private set; }

        public static TemplateHandlingSection TemplateHandlingConfiguration { get; private set; }
    }
}
